package com.yxq.mdt.app.modules.withdraw.ui;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;

import androidx.annotation.Nullable;

import com.blankj.utilcode.util.ToastUtils;
import com.yxq.mdt.app.R;
import com.yxq.mdt.app.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @author L
 * @time
 * @describe 绑定提现支付宝账户
 */
public class BindAliPayActivity extends BaseActivity {


    @BindView(R.id.login_et_account)
    EditText loginEtAccount;
    @BindView(R.id.login_et_name)
    EditText loginEtName;
    @BindView(R.id.draw_btn_submit)
    Button drawBtnSubmit;

    @Override
    public int getLayoutId() {
        return R.layout.activity_bind_ali_pay;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData(@Nullable Bundle savedInstanceState) {

    }

    @OnClick(R.id.draw_btn_submit)
    public void onViewClicked() {
        checkAccount();
    }

    private void checkAccount() {
        if (loginEtAccount.getText().toString().length() == 0) {
            ToastUtils.showShort("请输入支付宝账号");
            return;
        }
        if (loginEtName.getText().toString().length() == 0) {
            ToastUtils.showShort("请输入真实姓名");
            return;
        }
        Intent data = new Intent();
        data.putExtra("account", loginEtAccount.getText().toString());
        setResult(RESULT_OK, data);
        finish();
    }
}
